<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>文件中转</title>
<link href="./file/default.css" rel="stylesheet" type="text/css" />
<script src="./file/jquery.min.js"></script>
<script src="./file/api.js"></script>
<script type="text/javascript" src="./file/swfupload.js"></script>
<script type="text/javascript" src="./file/swfupload.queue.js"></script>
<script type="text/javascript" src="./file/fileprogress.js"></script>
<script type="text/javascript" src="./file/handlers.js"></script>
<script type="text/javascript"><!--
		var swfu;
		window.onload = function() {
			var settings = {
				flash_url : "./file/swfupload.swf",
				upload_url: "",
				file_size_limit : "100 MB",
				file_types : "*.*",
				file_types_description : "All Files",
				file_upload_limit : 100,
				file_queue_limit : 0,
				custom_settings : {
					progressTarget : "fsUploadProgress",
					cancelButtonId : "btnCancel"
				},
				debug: false,

				// Button settings
				button_image_url: "./image/TestImageNoText_65x29.png",
				button_width: "70",
				button_height: "29",
				button_placeholder_id: "spanButtonPlaceHolder",
				button_text: '<span class="theFont">选择文件</span>',
				button_text_style: ".theFont { font-size: 12; }",
				button_text_left_padding: 10,
				button_text_top_padding: 7,
				
				// The event handler functions are defined in handlers.js
				file_queued_handler : fileQueued,
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				upload_start_handler : uploadStart,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : uploadSuccess,
				upload_complete_handler : uploadComplete,
				queue_complete_handler : queueComplete	// Queue plugin event
			};

			swfu = new SWFUpload(settings);
			//serviceApi.getUploadedFileList(updateFileList);
	     };
function updateFileList(response)
{
	if(response.type == true)
	{
		for(var fileitem in response.fileList)
		{
			// $("#uploadFileList").append("<div>ddddddddddd</div>");
		}
	}
	
}
function delelteCallback(response){
	alert(response);
}
function deleteAllHistory()
{
	serviceApi.sendCancelAllUploadedAction(delelteCallback);
}

function uploadfile()
{
	 $("#uploaddialog").css("display","block");
}
--></script>
</head>

<body>
<div id="header">
	<h1 id="logo"><a href="#">Cloud Storage</a></h1>
</div>
<div id="uploadFileList"></div>
<div id="content">
<h3>选择文件进行上传</h3>
	<form id="form1" action="" method="post" enctype="multipart/form-data">
			<div class="fieldset flash" id="fsUploadProgress">
			<span class="legend">正在上传</span>
			</div>
			<div id="divStatus">0 个文件已经上传</div>
			<div>
				<span id="spanButtonPlaceHolder"></span>
				<input id="btnCancel" type="button" value="取消所有" onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 29px;" />
			</div>
	</form>
</div>
</body>
</html>
